\(\int \sec ^2(c+d x) (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx\) [1485]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 74 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {3 b \text {arctanh}(\sin (c+d x))}{8 d}-\frac {3 b \sec (c+d x) \tan (c+d x)}{8 d}+\frac {b \sec (c+d x) \tan ^3(c+d x)}{4 d}+\frac {a \tan ^4(c+d x)}{4 d} \]

[Out]

3/8*b*arctanh(sin(d*x+c))/d-3/8*b*sec(d*x+c)*tan(d*x+c)/d+1/4*b*sec(d*x+c)*tan(d*x+c)^3/d+1/4*a*tan(d*x+c)^4/d

Rubi [A] (verified)

Time = 0.11 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {2913, 2687, 30, 2691, 3855} \[ \int \sec ^2(c+d x) (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {a \tan ^4(c+d x)}{4 d}+\frac {3 b \text {arctanh}(\sin (c+d x))}{8 d}+\frac {b \tan ^3(c+d x) \sec (c+d x)}{4 d}-\frac {3 b \tan (c+d x) \sec (c+d x)}{8 d} \]

[In]

Int[Sec[c + d*x]^2*(a + b*Sin[c + d*x])*Tan[c + d*x]^3,x]

[Out]

(3*b*ArcTanh[Sin[c + d*x]])/(8*d) - (3*b*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (b*Sec[c + d*x]*Tan[c + d*x]^3)/(4
*d) + (a*Tan[c + d*x]^4)/(4*d)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2691

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(a*Sec[e +
 f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Dist[b^2*((n - 1)/(m + n - 1)), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 2913

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]),
 x_Symbol] :> Dist[a, Int[Cos[e + f*x]^p*(d*Sin[e + f*x])^n, x], x] + Dist[b/d, Int[Cos[e + f*x]^p*(d*Sin[e +
f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n, p}, x] && IntegerQ[(p - 1)/2] && IntegerQ[n] && ((LtQ[p, 0]
&& NeQ[a^2 - b^2, 0]) || LtQ[0, n, p - 1] || LtQ[p + 1, -n, 2*p + 1])

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = a \int \sec ^2(c+d x) \tan ^3(c+d x) \, dx+b \int \sec (c+d x) \tan ^4(c+d x) \, dx \\ & = \frac {b \sec (c+d x) \tan ^3(c+d x)}{4 d}-\frac {1}{4} (3 b) \int \sec (c+d x) \tan ^2(c+d x) \, dx+\frac {a \text {Subst}\left (\int x^3 \, dx,x,\tan (c+d x)\right )}{d} \\ & = -\frac {3 b \sec (c+d x) \tan (c+d x)}{8 d}+\frac {b \sec (c+d x) \tan ^3(c+d x)}{4 d}+\frac {a \tan ^4(c+d x)}{4 d}+\frac {1}{8} (3 b) \int \sec (c+d x) \, dx \\ & = \frac {3 b \text {arctanh}(\sin (c+d x))}{8 d}-\frac {3 b \sec (c+d x) \tan (c+d x)}{8 d}+\frac {b \sec (c+d x) \tan ^3(c+d x)}{4 d}+\frac {a \tan ^4(c+d x)}{4 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.26 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {3 b \text {arctanh}(\sin (c+d x))}{8 d}+\frac {3 b \sec (c+d x) \tan (c+d x)}{8 d}-\frac {3 b \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {b \sec (c+d x) \tan ^3(c+d x)}{d}+\frac {a \tan ^4(c+d x)}{4 d} \]

[In]

Integrate[Sec[c + d*x]^2*(a + b*Sin[c + d*x])*Tan[c + d*x]^3,x]

[Out]

(3*b*ArcTanh[Sin[c + d*x]])/(8*d) + (3*b*Sec[c + d*x]*Tan[c + d*x])/(8*d) - (3*b*Sec[c + d*x]^3*Tan[c + d*x])/
(4*d) + (b*Sec[c + d*x]*Tan[c + d*x]^3)/d + (a*Tan[c + d*x]^4)/(4*d)

Maple [A] (verified)

Time = 0.57 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.32

method result size
derivativedivides \(\frac {\frac {a \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+b \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(98\)
default \(\frac {\frac {a \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+b \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(98\)
risch \(\frac {i \left (8 i a \,{\mathrm e}^{6 i \left (d x +c \right )}+5 b \,{\mathrm e}^{7 i \left (d x +c \right )}-3 b \,{\mathrm e}^{5 i \left (d x +c \right )}+8 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+3 b \,{\mathrm e}^{3 i \left (d x +c \right )}-5 b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{4 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b}{8 d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b}{8 d}\) \(134\)
parallelrisch \(\frac {-6 b \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+6 b \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-4 a \cos \left (2 d x +2 c \right )+\cos \left (4 d x +4 c \right ) a +3 b \sin \left (d x +c \right )-5 b \sin \left (3 d x +3 c \right )+3 a}{4 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) \(152\)
norman \(\frac {-\frac {3 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {2 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {11 b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {2 b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {3 b \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {4 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {3 b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {3 b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) \(187\)

[In]

int(sec(d*x+c)^5*sin(d*x+c)^3*(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/4*a*sin(d*x+c)^4/cos(d*x+c)^4+b*(1/4*sin(d*x+c)^5/cos(d*x+c)^4-1/8*sin(d*x+c)^5/cos(d*x+c)^2-1/8*sin(d*
x+c)^3-3/8*sin(d*x+c)+3/8*ln(sec(d*x+c)+tan(d*x+c))))

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.26 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {3 \, b \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, b \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 8 \, a \cos \left (d x + c\right )^{2} - 2 \, {\left (5 \, b \cos \left (d x + c\right )^{2} - 2 \, b\right )} \sin \left (d x + c\right ) + 4 \, a}{16 \, d \cos \left (d x + c\right )^{4}} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/16*(3*b*cos(d*x + c)^4*log(sin(d*x + c) + 1) - 3*b*cos(d*x + c)^4*log(-sin(d*x + c) + 1) - 8*a*cos(d*x + c)^
2 - 2*(5*b*cos(d*x + c)^2 - 2*b)*sin(d*x + c) + 4*a)/(d*cos(d*x + c)^4)

Sympy [F(-1)]

Timed out. \[ \int \sec ^2(c+d x) (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\text {Timed out} \]

[In]

integrate(sec(d*x+c)**5*sin(d*x+c)**3*(a+b*sin(d*x+c)),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.20 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {3 \, b \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, b \log \left (\sin \left (d x + c\right ) - 1\right ) + \frac {2 \, {\left (5 \, b \sin \left (d x + c\right )^{3} + 4 \, a \sin \left (d x + c\right )^{2} - 3 \, b \sin \left (d x + c\right ) - 2 \, a\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{16 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/16*(3*b*log(sin(d*x + c) + 1) - 3*b*log(sin(d*x + c) - 1) + 2*(5*b*sin(d*x + c)^3 + 4*a*sin(d*x + c)^2 - 3*b
*sin(d*x + c) - 2*a)/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1))/d

Giac [A] (verification not implemented)

none

Time = 0.37 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.09 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {3 \, b \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - 3 \, b \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (5 \, b \sin \left (d x + c\right )^{3} + 4 \, a \sin \left (d x + c\right )^{2} - 3 \, b \sin \left (d x + c\right ) - 2 \, a\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

1/16*(3*b*log(abs(sin(d*x + c) + 1)) - 3*b*log(abs(sin(d*x + c) - 1)) + 2*(5*b*sin(d*x + c)^3 + 4*a*sin(d*x +
c)^2 - 3*b*sin(d*x + c) - 2*a)/(sin(d*x + c)^2 - 1)^2)/d

Mupad [B] (verification not implemented)

Time = 17.75 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.95 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {-\frac {3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {11\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {11\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4}-\frac {3\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {3\,b\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d} \]

[In]

int((sin(c + d*x)^3*(a + b*sin(c + d*x)))/cos(c + d*x)^5,x)

[Out]

(4*a*tan(c/2 + (d*x)/2)^4 - (3*b*tan(c/2 + (d*x)/2))/4 + (11*b*tan(c/2 + (d*x)/2)^3)/4 + (11*b*tan(c/2 + (d*x)
/2)^5)/4 - (3*b*tan(c/2 + (d*x)/2)^7)/4)/(d*(6*tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*
x)/2)^6 + tan(c/2 + (d*x)/2)^8 + 1)) + (3*b*atanh(tan(c/2 + (d*x)/2)))/(4*d)